Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support client token in params #155

Merged
merged 3 commits into from
Jan 6, 2024
Merged

Conversation

jonallured
Copy link
Owner

This PR adds support for passing the client token as a param - prior to this one the token had to be passed as a header. That worked up until I didn't have control over the request being made only the URL. I'm looking at you Sendgrid!

So now these both work:

$ http POST https://app.jonallured.com/api/v1/post_bin X-Mli-Client-Token:$CLIENT_TOKEN
$ http POST https://app.jonallured.com/api/v1/post_bin?mli_client_token=$CLIENT_TOKEN

I also introduced an update to the HookRequest class so that these two are redacted. There weren't any specs for this class so I started by adding some and then went from there.

Note that at the same time I also renamed these to include "mli" to prevent any accidental redactions.

@jonallured jonallured merged commit 27b8784 into main Jan 6, 2024
2 checks passed
@jonallured jonallured deleted the support-client-token-in-params branch January 6, 2024 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant